#include "mainwindow.h"
#include <QDebug>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    createMenuBar();
    createStatusBar();
    this->playData = new PlayData(QSize(25,20));
    this->playCanvas = new QWidgetPlayCanvas(playData);
    this->setCentralWidget(this->playCanvas);
    this->playCanvas->repaint();
}

MainWindow::~MainWindow()
{

}

void MainWindow::createMenuBar()
{
    this->menuBar = new QMenuBar(this);
    this->setMenuBar(menuBar);
    QMenu *menuGame = menuBar->addMenu("Game");
    menuGame->addAction(QIcon(),"New game");
    menuGame->addAction(QIcon(),"Forfeit");
    menuGame->addSeparator();
    menuGame->addAction(QIcon(),"Exit");
}

void MainWindow::createStatusBar()
{
    this->statusBar = new QStatusBar(this);
    this->setStatusBar(statusBar);
    this->statusBar->showMessage("Ready");
}
